package org.example.video_word.controller;

import org.example.video_word.entity.Admin;
import org.example.video_word.mapper.AdminMapper;
import org.example.video_word.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AdminController {

    @Autowired
    private AdminService adminService;

    //管理员新增
    @RequestMapping("/admin/add")
    public boolean add(String username,String password){
        Admin admin =new Admin();
        admin.setUsername(username);
        admin.setPassword(password);
       return adminService.add(admin);
    }
    //管理员密码修改

    //管理员登录
    public  boolean login(String username,String password){
        //根据账号查询管理员信息

        //对比密码是否正确

        //判断账号是否禁用

        return false;
    }

    //删除管理员

    //管理员列表查询
}
